
const path = require('path');
const fs = require('fs');

module.exports = appInfo => {
  const config = exports = {};

  config.reactssr = {
    layout: path.join(appInfo.baseDir, 'client/view/layout.html'),
  };

  config.siteFile = {
    '/favicon.ico': fs.readFileSync(path.join(appInfo.baseDir, 'client/asset/images/favicon.ico')),
  };

  config.logger = {
    consoleLevel: 'DEBUG',
    dir: path.join(appInfo.baseDir, 'logs'),
  };

  config.static = {
    prefix: '/public/',
    dir: path.join(appInfo.baseDir, 'public'),
  };

  // use for cookie sign key, should change to your own and keep security
  config.keys = appInfo.name + '_1540776498344_8088';

  // add your config here
  config.middleware = [ 'access' ];

  return config;
};
